<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="robots" content="noodp" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
        <title>《Dart VM Service简介》 - Lucklyの博客 - 在阅读中遇见自己</title><meta name="Description" content="早起的年轻人做的网站"><meta property="og:title" content="《Dart VM Service简介》" />
<meta property="og:description" content="
本文主要介绍Flutter 开发工具 DevTools
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://luckly.work/dart-vm-service%E7%AE%80%E4%BB%8B/" />
<meta property="og:image" content="https://luckly.work/logo.png"/>
<meta property="article:published_time" content="2021-06-24T21:41:33+08:00" />
<meta property="article:modified_time" content="2021-06-24T21:41:33+08:00" />
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://luckly.work/logo.png"/>

<meta name="twitter:title" content="《Dart VM Service简介》"/>
<meta name="twitter:description" content="
本文主要介绍Flutter 开发工具 DevTools
"/>
<meta name="application-name" content="LoveIt">
<meta name="apple-mobile-web-app-title" content="LoveIt"><meta name="theme-color" content="#ffffff"><meta name="msapplication-TileColor" content="#da532c"><link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
        <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
        <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"><link rel="manifest" href="/site.webmanifest"><link rel="canonical" href="https://luckly.work/dart-vm-service%E7%AE%80%E4%BB%8B/" /><link rel="prev" href="https://luckly.work/%E5%9C%A8flutter%E4%B8%AD%E7%9A%84%E5%BC%80%E5%8F%91%E5%B0%8F%E6%8A%80%E5%B7%A72/" /><link rel="next" href="https://luckly.work/dart-file/" /><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.1/normalize.min.css"><link rel="stylesheet" href="/css/style.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.13.0/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.7.2/animate.min.css"><script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "BlogPosting",
        "headline": "《Dart VM Service简介》",
        "inLanguage": "zh-CN",
        "mainEntityOfPage": {
            "@type": "WebPage",
            "@id": "https:\/\/luckly.work\/dart-vm-service%E7%AE%80%E4%BB%8B\/"
        },"image": [{
                            "@type": "ImageObject",
                            "url": "https:\/\/luckly.work\/images\/Apple-Devices-Preview.png",
                            "width":  3200 ,
                            "height":  2048 
                        }],"genre": "posts","keywords": "flutter","wordcount":  1228 ,
        "url": "https:\/\/luckly.work\/dart-vm-service%E7%AE%80%E4%BB%8B\/","datePublished": "2021-06-24T21:41:33+08:00","dateModified": "2021-06-24T21:41:33+08:00","license": "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.","publisher": {
            "@type": "Organization",
            "name": "xxxx","logo": {
                    "@type": "ImageObject",
                    "url": "https:\/\/luckly.work\/images\/avatar.png",
                    "width":  528 ,
                    "height":  560 
                }},"author": {
                "@type": "Person",
                "name": "早起的年轻人"
            },"description": ""
    }
    </script></head>
    <body header-desktop="fixed" header-mobile="auto"><script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('auto' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : 'auto' === 'dark')) && document.body.setAttribute('theme', 'dark');</script>

        <div id="mask"></div><div class="wrapper"><div class="logo-wrapper">
  <a href="/%20/" class="logo">Lucklyの博客 - 在阅读中遇见自己</a>
</div>

<nav class="site-navbar">
  <ul id="menu" class="menu">
    <li class="menu-item">
      <a class="menu-item-link" href="/posts/">所有文章</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/categories/flutter/">Flutter</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/categories/read/">读书笔记</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/categories/go/">Go</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/tags/">标签</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/categories/">分类</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/about/">关于</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="https://github.com/ITmxs">Github</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/friend/">友链</a>
    </li>
  </ul>
</nav><main class="main">
                <div class="container"><div class="toc" id="toc-auto">
            <h2 class="toc-title">目录</h2>
            <div class="toc-content" id="toc-content-auto"></div>
        </div><article class="page single"><h1 class="single-title animated flipInX">《Dart VM Service简介》</h1><div class="post-meta">
            <div class="post-meta-line"><span class="post-author"><a href="/" title="Author" rel=" author" class="author"><i class="fas fa-user-circle fa-fw"></i>早起的年轻人</a></span>&nbsp;<span class="post-category">收录于 <a href="/categories/flutter/"><i class="far fa-folder fa-fw"></i>Flutter</a></span></div>
            <div class="post-meta-line"><i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time datetime="2021-06-24">2021-06-24</time>&nbsp;<i class="fas fa-pencil-alt fa-fw"></i>&nbsp;约 1228 字&nbsp;
                <i class="far fa-clock fa-fw"></i>&nbsp;预计阅读 3 分钟&nbsp;</div>
        </div><div class="featured-image"><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png"
        data-srcset="https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png, https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png 1.5x, https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png 2x"
        data-sizes="auto"
        alt="https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png"
        title="https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png" /></div><div class="details toc" id="toc-static"  kept="">
                <div class="details-summary toc-title">
                    <span>目录</span>
                    <span><i class="details-icon fas fa-angle-right"></i></span>
                </div>
                <div class="details-content toc-content" id="toc-content-static"><nav id="TableOfContents">
  <ul>
    <li><a href="#dart-vm-service-protocol">Dart VM Service Protocol</a>
      <ul>
        <li><a href="#rpc">RPC</a></li>
        <li><a href="#event-和-binary-event">Event 和 Binary Event</a></li>
        <li><a href="#types">Types</a></li>
      </ul>
    </li>
    <li><a href="#dart-vm-service-protocol-extension">Dart VM Service Protocol Extension</a></li>
    <li><a href="#总结">总结</a></li>
    <li><a href="#参考">参考</a></li>
  </ul>
</nav></div>
            </div><div class="content" id="content"><blockquote>
<p>本文主要介绍Flutter 开发工具 DevTools</p>
</blockquote>
<p>Flutter 开发工具 DevTools 是不是有些神奇？移动端开发中用到的性能工具通常是原生应用，而 DevTools 却是基于浏览器的。为什么要基于浏览器开发，Dart VM Service Protocol 又是什么？简单了解一下。</p>
<p>Dart DevTools 提供 hot reload、UI 调试和内存分析等各种功能。</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/15941055868454.jpg"
        data-srcset="https://luckly007.oss-cn-beijing.aliyuncs.com/img/15941055868454.jpg, https://luckly007.oss-cn-beijing.aliyuncs.com/img/15941055868454.jpg 1.5x, https://luckly007.oss-cn-beijing.aliyuncs.com/img/15941055868454.jpg 2x"
        data-sizes="auto"
        alt="https://luckly007.oss-cn-beijing.aliyuncs.com/img/15941055868454.jpg"
        title="img" /></p>
<h1 id="dart-vm-service-protocol">Dart VM Service Protocol</h1>
<p>先来看看 Dart VM Service Protocol 是什么。</p>
<p><a href="https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#rpcs-requests-and-responses" target="_blank" rel="noopener noreffer">Dart VM Service Protocol 3.36</a> 介绍如下：</p>
<blockquote>
<p>Service Protocol 协议用于跟运行中的 Dart VM 通信</p>
<p>使用 <code>--observe</code> 启动 Dart VM 后就能使用 Service Protocol。VM 会启动一个 webserver 并通过 WebSocket 为 protocol request 提供服务。也可发送 HTTP (非WebSocket)请求，但这种情况下无法访问 VM <em>event</em></p>
<p>Service Protocol 使用 <a href="http://www.jsonrpc.org/specification" target="_blank" rel="noopener noreffer">JSON-RPC 2.0</a> 来通信</p>
</blockquote>
<h2 id="rpc">RPC</h2>
<p>通过 <a href="https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#getversion" target="_blank" rel="noopener noreffer">getVersion</a> 这个例子来看看 RPC 请求和响应。</p>
<p>RPC request 是一个发送到 server 的 JSON 对象。</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">{
  &#34;jsonrpc&#34;: &#34;2.0&#34;, // jsonprc 属性可选
  &#34;method&#34;: &#34;getVersion&#34;, //
  &#34;params&#34;: {}, // params 属性在 Dart 代码中以 named parameters 形式提供
  &#34;id&#34;: &#34;1&#34; // id 属性可以是 string, number, null
}
</code></pre></td></tr></table>
</div>
</div><p>RPC response 也是一个 JSON 对象。</p>
<p>这是一个成功的 RPC response：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span><span class="lnt">9
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">{
  &#34;jsonrpc&#34;: &#34;2.0&#34;,
  &#34;result&#34;: { // 请求成功时返回 result 属性
    &#34;type&#34;: &#34;Version&#34;, // type 参数可用于判断准确的返回类型，它是 Response 类的子类
    &#34;major&#34;: 3,
    &#34;minor&#34;: 5
  }
  &#34;id&#34;: &#34;1&#34; // id 属性跟对应请求中的 id 匹配
}
</code></pre></td></tr></table>
</div>
</div><p>这是一个失败的 RPC response：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">{
  &#34;jsonrpc&#34;: &#34;2.0&#34;,
  &#34;error&#34;: { // 请求失败时返回 error 属性，它包括 code, message 和 data
    &#34;code&#34;: 103,
    &#34;message&#34;: &#34;Stream already subscribed&#34;,
    &#34;data&#34;: {
      &#34;details&#34;: &#34;The stream &#39;GC&#39; is already subscribed&#34;
    }
  }
  &#34;id&#34;: &#34;2&#34;
}
</code></pre></td></tr></table>
</div>
</div><p>[JSON-RPC 规范](<a href="https://www.sunmoonblog.com/2020/07/07/dart-vm-service/error">https://www.sunmoonblog.com/2020/07/07/dart-vm-service/error</a> codes)的基础上，Service Protocol 定义了一些额外的错误码。具体错误见 Service Protocol 文档，这里不展开。</p>
<h2 id="event-和-binary-event">Event 和 Binary Event</h2>
<ul>
<li>通过使用 <a href="https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#streamlisten" target="_blank" rel="noopener noreffer">streamListen</a> 和 <a href="https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#streamcancel" target="_blank" rel="noopener noreffer">streamCancel</a> RPC，客户端可以收到 VM 中特定 stream 上的事件通通知</li>
<li>每个 stream 跟一个 <em>stream id</em> 关联</li>
<li>每个 stream 跟某种类型的事件关联。比如 <em>Isolate</em> stream 提供 isolate 相关的创建和销毁等事件</li>
<li>客户端通过 WebSocket 异步接收 stream event</li>
<li>某些事件跟二进制数据关联，通过 WebSocket binary frame 而不是 text frame 发送这些事件</li>
</ul>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">{
  &#34;json-rpc&#34;: &#34;2.0&#34;,
  &#34;method&#34;: &#34;streamNotify&#34;,
  &#34;params&#34;: { // 参数中包括 streamId 和 event 属性
    &#34;streamId&#34;: &#34;Isolate&#34;,
    &#34;event&#34;: {
      &#34;type&#34;: &#34;Event&#34;,
      &#34;kind&#34;: &#34;IsolateExit&#34;,
      &#34;isolate&#34;: {
        &#34;type&#34;: &#34;@Isolate&#34;,
        &#34;id&#34;: &#34;isolates/33&#34;,
        &#34;number&#34;: &#34;51048743613&#34;,
        &#34;name&#34;: &#34;worker-isolate&#34;
      }
    }
  }
}
</code></pre></td></tr></table>
</div>
</div><h2 id="types">Types</h2>
<p>Service Protocol 中的每个响应或事件均有 <code>type</code> 属性，它是 <a href="https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#response" target="_blank" rel="noopener noreffer">Response</a> 子类。客户端可以通过 <code>type</code> 属性判断每种响应或事件的准确类型。</p>
<ul>
<li>以 <code>@</code> 开头的 type 表示当前响应是一个 <code>reference</code></li>
<li>不以 <code>@</code> 开头的 type 表示当前响应是一个 <code>object</code></li>
</ul>
<p><code>reference</code> 可提供的信息是 <code>object</code> 的子集</p>
<h1 id="dart-vm-service-protocol-extension">Dart VM Service Protocol Extension</h1>
<p><a href="https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service_extension.md" target="_blank" rel="noopener noreffer">Dart VM Service Protocol Extension</a> 与 VM 通信的方式跟 Service Protocol 类似跟类似，但它们并不是核心 <a href="https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md" target="_blank" rel="noopener noreffer">Dart VM Service Protocol</a> 的一部分，仅允许通过某些核心库访问。</p>
<p>通过添加前缀名来调用对应的 RPC 接口，类似 “ext.dart.libraryName”。比如，调用 <code>ext.dart.io.getSocketProfile</code> 来执行 dart:io 暴露的 <code>getSocketProfile</code> RPC 接口。</p>
<h1 id="总结">总结</h1>
<p>简单了解 Dart VM Service Protocol 和 Dart VM Service Protocol Extension 后，我们有以下认识：</p>
<ul>
<li>Service Protocol 和 Service Protocol Extension 是一套 RPC-JSON 协议</li>
<li>Service Protocol 兼容性好，可以很容易地集成到现有 IDE</li>
<li>VM 会启动一个 webserver 并通过 WebSocket 为客户端提供服务</li>
</ul>
<p>为什么要基于浏览器来开发 DevTools？有以下几个原因</p>
<ul>
<li>浏览器天生支持 WebSocket，所以基于浏览器开发 DevTools 是水到渠成</li>
<li>基于浏览器开发 DevTools，可兼容多平台</li>
<li>当前的 DevTools 是使用 Flutter 框架开发的 (没错，Flutter。以前是纯 Dart 开发)，部署成 Web 应用很方便</li>
</ul>
<h1 id="参考">参考</h1>
<ul>
<li><a href="https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#rpcs-requests-and-responses" target="_blank" rel="noopener noreffer">sdk/service.md at master · dart-lang/sdk</a></li>
<li><a href="https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service_extension.md" target="_blank" rel="noopener noreffer">sdk/service_extension.md at master · dart-lang/sdk</a></li>
<li>[我们用 Flutter 写了一套全新的 Flutter 开发者工具](</li>
</ul></div><div class="post-footer" id="post-footer">
    <div class="post-info">
        <div class="post-info-line">
            <div class="post-info-mod">
                <span>更新于 2021-06-24</span>
            </div>
            <div class="post-info-license"></div>
        </div>
        <div class="post-info-line">
            <div class="post-info-md"></div>
            <div class="post-info-share">
                <span><a href="javascript:void(0);" title="分享到 Twitter" data-sharer="twitter" data-url="https://luckly.work/dart-vm-service%E7%AE%80%E4%BB%8B/" data-title="《Dart VM Service简介》" data-hashtags="flutter"><i class="fab fa-twitter fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Facebook" data-sharer="facebook" data-url="https://luckly.work/dart-vm-service%E7%AE%80%E4%BB%8B/" data-hashtag="flutter"><i class="fab fa-facebook-square fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Hacker News" data-sharer="hackernews" data-url="https://luckly.work/dart-vm-service%E7%AE%80%E4%BB%8B/" data-title="《Dart VM Service简介》"><i class="fab fa-hacker-news fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Line" data-sharer="line" data-url="https://luckly.work/dart-vm-service%E7%AE%80%E4%BB%8B/" data-title="《Dart VM Service简介》"><i data-svg-src="https://cdn.jsdelivr.net/npm/simple-icons@2.14.0/icons/line.svg"></i></a><a href="javascript:void(0);" title="分享到 微博" data-sharer="weibo" data-url="https://luckly.work/dart-vm-service%E7%AE%80%E4%BB%8B/" data-title="《Dart VM Service简介》" data-image="https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png"><i class="fab fa-weibo fa-fw"></i></a></span>
            </div>
        </div>
    </div>

    <div class="post-info-more">
        <section class="post-tags"><i class="fas fa-tags fa-fw"></i>&nbsp;<a href="/tags/flutter/">flutter</a></section>
        <section>
            <span><a href="javascript:void(0);" onclick="window.history.back();">返回</a></span>&nbsp;|&nbsp;<span><a href="/">主页</a></span>
        </section>
    </div>

    <div class="post-nav"><a href="/%E5%9C%A8flutter%E4%B8%AD%E7%9A%84%E5%BC%80%E5%8F%91%E5%B0%8F%E6%8A%80%E5%B7%A72/" class="prev" rel="prev" title="《在Flutter中的开发小技巧2》"><i class="fas fa-angle-left fa-fw"></i>《在Flutter中的开发小技巧2》</a>
            <a href="/dart-file/" class="next" rel="next" title="《Dart File》">《Dart File》<i class="fas fa-angle-right fa-fw"></i></a></div>
</div>
</article></div>
            </main><footer class="footer">
        <div class="footer-container"><div class="footer-line">由 <a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo 0.79.1">Hugo</a> 强力驱动 | 主题 - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt 0.2.10"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a>
                </div><div class="footer-line"><i class="far fa-copyright fa-fw"></i><span itemprop="copyrightYear">2021</span><span class="author" itemprop="copyrightHolder">&nbsp;<a href="/" target="_blank">早起的年轻人</a></span>&nbsp;|&nbsp;<span class="license"><a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a></span></div>
        </div>
    </footer></div>

        <div id="fixed-buttons"><a href="#" id="back-to-top" class="fixed-button" title="回到顶部">
                <i class="fas fa-arrow-up fa-fw"></i>
            </a><a href="#" id="view-comments" class="fixed-button" title="查看评论">
                <i class="fas fa-comment fa-fw"></i>
            </a>
        </div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cookieconsent@3.1.1/build/cookieconsent.min.css"><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/smooth-scroll@16.1.3/dist/smooth-scroll.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/autocomplete.js@0.37.1/dist/autocomplete.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/algoliasearch@4.2.0/dist/algoliasearch-lite.umd.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lazysizes@5.2.2/lazysizes.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/sharer.js@0.4.0/sharer.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/cookieconsent@3.1.1/build/cookieconsent.min.js"></script><script type="text/javascript">window.config={"code":{"copyTitle":"复制到剪贴板","maxShownLines":10},"comment":{},"cookieconsent":{"content":{"dismiss":"同意","link":"了解更多","message":"本网站使用 Cookies 来改善您的浏览体验."},"enable":true,"palette":{"button":{"background":"#f0f0f0"},"popup":{"background":"#1aa3ff"}},"theme":"edgeless"},"search":{"algoliaAppID":"PASDMWALPK","algoliaIndex":"index.zh-cn","algoliaSearchKey":"b42948e51daaa93df92381c8e2ac0f93","highlightTag":"em","maxResultLength":10,"noResultsFound":"没有找到结果","snippetLength":50,"type":"algolia"}};</script><script type="text/javascript" src="/js/theme.min.js"></script></body>
</html>
